package com.willpower.vueshop;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

/**
 * @author: wen-yi;
 * @date: 2021/10/30 1:22;
 * @Description:
 */
@EnableDiscoveryClient //注册eureka客户端
@SpringBootApplication
@EnableOAuth2Sso //开启单点登录
@EnableGlobalMethodSecurity(prePostEnabled = true) //开启权限开关
public class VueShopApplication {
    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(VueShopApplication.class);
        application.setBannerMode(Banner.Mode.OFF); //关闭Banner
        application.run(args);
        System.out.println("vue shop server start...");
    }
}
